package com.muki.contentSeen;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.muki.repository.ContentRepository;

@Component
public class MongoContentPersistant implements ContentPersistant{

	@Autowired private ContentRepository repository;

	@Override
	public void persistant(Content content) {
		if(repository.findByUrl(content.getUrl())==null)
			repository.save(content);
	}

}
